<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #box {
            width: 100px;
            height: 100px;
            background-color: aqua;
        }
    </style>
</head>

<body>
    <div id="app">
        <div id="box" v-if="dian==10"></div>
        <button @click="show">点击十次</button>
    </div>
</body>
<script src="/vue.js"></script>
<script>
    const { createApp, ref } = Vue;
    createApp({
        setup() {
            let dian = ref(0)

            function show() {
                dian.value++
            }
            return {
                dian,
                show

            }
        }
    }).mount("#app")
</script>

</html>